{volist name="list" id="vo"}
<div class="order-item">
    <div onclick="unifiedJump(this);" data-url="{:weapp_url('Mbackend/Shop/order_details', ['order_id'=>$vo.order_id])}">
        <div class="head">
            <span class="order-no">{$vo.order_code}</span>
            <span class="pay-type-name color-base-text">{$pay_method_arr[$vo.pay_name]|default='未付款'}</span>
            <span class="order-status">
                <span class="{eq name='$vo.order_status' value='0'}show{else/}none{/eq}">待付款</span>
                {eq name="$vo.logistics_type" value="2"}
                <span class="{eq name='$vo.order_status' value='1'}show{else/}none{/eq}">待核销</span>
                {else /}
                <span class="{eq name='$vo.order_status' value='1'}show{else/}none{/eq}">{notempty name="$LogData[$vo.order_id]['action_count']"} <i class="iconfont icon-tixing"></i> {/notempty}待发货</span>
                {/eq}
                <span class="{eq name='$vo.order_status' value='2'}show{else/}none{/eq}">已发货</span>
                <span class="{eq name='$vo.order_status' value='3'}show{else/}none{/eq}">已完成</span>
                <span class="{eq name='$vo.order_status' value='-1'}show{else/}none{/eq}">已关闭</span>
            </span>
        </div>

        {volist name="$vo.Details" id="do"}
        <div class="goods-item">
            <div class="goods-img"> <img src="{$do.litpic}"> </div>
            <div class="info-wrap">
                <div class="name-wrap">{$do.product_name}</div>
                {notempty name="$do.spec_value_list"}
                <div class="spec-wrap">{volist name="$do.spec_value_list" id="sp"}<span>{$sp.value}</span>{/volist}</div>
                {/notempty}
                <div class="more-wrap">
                    <div class="goods-class"></div>
                    <div class="price-wrap text-align-r">
                        <div class="price">
                            {empty name="$vo.points_shop_order"}
                            <span class="unit">￥</span>
                            {/empty}
                            <span class="">{$do.product_price}</span>
                        </div>
                        <div class="num">x{$do.num}</div>
                        {if condition="!empty($do.actualPayPrice)"}
                        <div class="dispatch"><span class="">实付款￥</span>{$do.actualPayPrice}</div>
                        {/if}
                    </div>
                </div>
            </div>
        </div>
        {/volist}

        <div class="total-wrap">
            <span class="create-time">下单时间：{$vo.add_time}</span>
            <span class="label">合计：</span>
            <div class="price color-base-text">
                {empty name="$vo.points_shop_order"}
                <span class="unit">￥</span>
                {/empty}
                <span class="price-z">{$vo.order_amount}</span>
            </div>
        </div>
    </div>

    {eq name="$vo.logistics_type" value="1"}
    <div class="member-wrap">
        <div>
            <span class="name div-text">{$vo.consignee}</span>
            <div class="mobile-wrap">
                <span class="iconfont icon-dianhua color-base-text div-text"></span>
                <span class="mobile color-base-text div-text">{$vo.mobile}</span>
            </div>
            <div class="address div-text">{$vo.address}</div>
        </div>
        <div class="copy-sty">
            <a class="copy address" onclick="textCopy('address');" data-clipboard-text="收货人：{$vo.consignee},手机号：{$vo.mobile},地址：{$vo.address}">复制</a>
        </div>
    </div>
    {else/}
    <div class="member-wrap">
        <div>
            <span class="name div-text">{$vo.consignee}</span>
            <div class="mobile-wrap">
                <span class="iconfont icon-dianhua color-base-text div-text"></span>
                <span class="mobile color-base-text div-text">{$vo.mobile}</span>
            </div>
        </div>
        <div class="copy-sty">
            <a class="copy address" onclick="textCopy('address');" data-clipboard-text="收货人：{$vo.consignee},手机号：{$vo.mobile}">复制</a>
        </div>
    </div>
    {/eq}

    <div class="displayflex">
        {eq name="$vo.order_status" value='0'}
        <!-- 订单未付款时出现 -->
        <div class="order-action-wrap">
            <button class="on" onclick="orderMarkStatus('yfk', '{$vo.order_id}', '{$vo.users_id}');">确认付款</button>
            <button class="on" onclick="promptChangePrice('{$vo.order_id}', '{$vo.order_amount}');">订单改价</button>
            <button class="on" onclick="orderMarkStatus('gbdd', '{$vo.order_id}', '{$vo.users_id}');">关闭订单</button>
        <!-- END -->
        {/eq}

        {eq name="$vo.order_status" value='1'}
        <!-- 订单待发货时出现 -->
        <div class="order-action-wrap">
            <!-- <button class="on" onclick="promptManualRefund('{$vo.order_id}');">手动退款</button> -->
            <button class="on" onclick="unifiedJump(this);" data-url="{:weapp_url('Mbackend/Shop/order_active_refund', ['order_id'=>$vo.order_id])}">主动退款</button>
            {eq name="$vo.logistics_type" value="2"}
            <button class="on" onclick="orderVerify({$vo.order_id}, {$vo.users_id}, {$weappInfo['data']['openVerify']|default=0}, {$weappInfo['data']['openSecondVerify']|default=0});">确认核销</button>
            {else /}
            <button class="on" onclick="orderSend(this);" data-href="{:weapp_url('Mbackend/Shop/order_send', ['order_id'=>$vo.order_id])}">确认发货</button>
            {/eq}
        <!-- END -->
        {/eq}

        {eq name="$vo.order_status" value='2'}
        <!-- 订单已发货时出现 -->
        <div class="order-action-wrap">
            <button class="on" onclick="orderMarkStatus('ysh', '{$vo.order_id}', '{$vo.users_id}');">确认收货</button>
            <button class="" onclick="orderRemarks('{$vo.order_id}');">订单备注</button>
        <!-- END -->
        {/eq}

        {if condition="-1 == $vo.order_status or 3 == $vo.order_status"}
        <!-- 订单取消或订单完成时出现 -->
        <div class="order-action-wrap">
            <button class="" onclick="orderRemarks('{$vo.order_id}');">订单备注</button>
            <!-- <button class="on" onclick="orderMarkStatus('ddsc','{$vo.order_id}','{$vo.users_id}');">订单删除</button> -->
        <!-- END -->
        {/if}

        {if condition="-1 == $vo.order_status and 1 == $vo.manual_refund"}
        <!-- 订单时手动退款时出现 -->
            <button class="on" onclick="layerAlert('{$vo.refund_note}', '关闭');">手动退款原因</button>
        <!-- END -->
        {/if}
        </div>
    </div>
</div>
{/volist}